package com.cqvie.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;

import org.hibernate.annotations.GenericGenerator;

@Entity
public class CourseSchedule {
	private String ID; // 课程安排表ID
	private int teacherID; // 教师ID
	private String stuID; // 授权的学生

	private Course courseID; // 课程
	private ClassRoom localtion;// 上课地点
	private TimeTable courseTime;// 课程时间

	@OneToOne
	@JoinColumn(name="courseName")
	public Course getCourseID() {
		return courseID;
	}

	@OneToOne
	@JoinColumn(name="courseTime")
	public TimeTable getCourseTime() {
		return courseTime;
	}

	@Id
	@GeneratedValue(generator = "uuid")
	@GenericGenerator(name = "uuid", strategy = "uuid")
	public String getID() {
		return ID;
	}

	@OneToOne
	@JoinColumn(name="location")
	public ClassRoom getLocaltion() {
		return localtion;
	}

	public String getStuID() {
		return stuID;
	}

	@Column(length = 20)
	public int getTeacherID() {
		return teacherID;
	}

	public void setCourseID(Course courseID) {
		this.courseID = courseID;
	}

	public void setCourseTime(TimeTable courseTime) {
		this.courseTime = courseTime;
	}

	public void setID(String iD) {
		ID = iD;
	}

	public void setLocaltion(ClassRoom localtion) {
		this.localtion = localtion;
	}

	public void setStuID(String stuID) {
		this.stuID = stuID;
	}

	public void setTeacherID(int teacherID) {
		this.teacherID = teacherID;
	}
}
